<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link type="text/css" rel="stylesheet" href="/Store/Public/Admin/css/H-ui.css"/>
<link rel="stylesheet" type="text/css" href="/Store/Public/layui/css/layui.css"></link>
<link type="text/css" rel="stylesheet" href="/Store/Public/Admin/css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="/Store/Public/Admin/font/font-awesome.min.css"/>
<script type="text/javascript" src="/Store/Public/Admin/js1/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/Store/Public/layer/layer.js"></script>
<title>添加角色</title>
</head>
<body>
<div class="pd-20">
    <table class="table table-border table-bordered table-bg">
      <tbody>
       <tr>
            <th width="100" class="text-r"><span class="c-red">*</span> 角色名称：</th>
            <td><input type="text" style="width:200px" id="name" class="input-text" value="" placeholder="" id="user-name" name="user-name" datatype="*2-16" nullmsg="用户名不能为空"></td>
          </tr>
    
      </tbody>
    </table>
        &nbsp;&nbsp;&nbsp;&nbsp;
      <div class="layui-form-item">
          <div class="layui-input-block">
          <button class="layui-btn"lay-submit lay-fileter="formDemo" id="commit">提交</button>
          <button type="reset" class="layui-btn layui-btn-primary">重置</button>
      </div>
      </div>
</div>


<script>
$(function(){
	$('#commit').click(function(){
		var  name = $('#name').val();
		$.post('/Store/index.php/Admin/Role/test',{name:name},function(data){
			
			if(data.errno==1){
				layer.msg(data.msg);
			}
		},'json')
	})

})
</script>

</body>
</html>

<!--代码整理：js代码 www.jsdaima.com-->